<style>
    *{
        font-size: 28px;
    }
</style>
<h2>中文文档
    <p>1.<em>https://tutorial.comptechs.cn/puppeteer/puppeteer-debug.html#</em></p>
    <p>2.<em>https://zhaoqize.github.io/puppeteer-api-zh_CN/#/</em></p></h2>
<br/>
<p><strong>
    puppeteer由于众所周知的原因会下载失败，我们可以使用puppeteer-core配合本地的Chrome或者Chrome Canary来使用：
</strong></p>
<p>首先安装puppeteer-core和Carlo(会用到Carlo的find_chrome模块,可以在node_modules/carlo/lib/目录下找到)</p>
<p>
    <blockquote>
        <pre>
            //安装对应chrome@71对应的puppeteer
            npm install puppeteer-core@chrome-71
            //安装Carlo
            npm i carlo
            //或 yarn add carlo
        </pre>
    </blockquote>
</p>

<p><strong>不同版本的浏览器可以使用对应版本的puppeteer-core，以减少不兼容问题。</strong></p>
<br/>
<p>具体的puppeteer对应的Chrome版本查看：https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md 中的Releases per Chromium Version部分</p>

<p>
    <blockquote><pre>
        const puppeteer = require('puppeteer-core');
        //find_chrome模块来源于GoogleChromeLabs的Carlo,可以查看本机安装Chrome目录，详细请查看底部博客,

        const findChrome = require('./node_modules/carlo/lib/find_chrome');

        (async () => {
        let findChromePath = await findChrome({});
        let executablePath = findChromePath.executablePath;
        console.log(executablePath)
        const browser = await puppeteer.launch({
            executablePath,
            headless: false
        });

        const page = await browser.newPage();
        await page.goto('http://www.woleigequ.net/');
        /*
            dosomeThing
        */

        await browser.close();
        })();
    </pre></blockquote>
</p>